﻿using System;
using System.Collections.Generic;
using System.Windows;
using QuizzMe.Helpers;

namespace QuizzMe.Pages
{
    /// <summary>
    /// Rules page
    /// </summary>
    public partial class Rules : BasePage
    {
        /// <summary>
        /// Type of rule
        /// </summary>
        public enum ERuleKind
        {
            Info,
            Chart,
            Warning
        }

        public class Rule
        {
            public string Kind { get; set; }
            public string Text { get; set; }

            public Rule(string text, string kind = "info")
            {
                Text = text;
                Kind = kind;
            }
        }

        public List<Rule> RuleList { get; set; }

        public Rules()
        {
            RuleList = new List<Rule>
                           {
                               new Rule("QuizzMe is a knowledge testing game."),
                               new Rule("Log in with your facebook account"),
                               new Rule("Play a theme-specific quizz or a random one"),
                               new Rule("Earn points by answering questions correctly", "chart"),
                               new Rule("As difficulty increases, each good answer bring you more points.", "warning"),
                               new Rule("But bad answers can take the points back !", "badchart"),
                               new Rule("So be careful when answering a question whose answer is unknown.", "wrong"),

                           };

            InitializeComponent();
        }

        private void ButtonCancelClick(object sender, RoutedEventArgs e)
        {
            this.NavigateTo(new Uri("/Home", UriKind.Relative));
        }
    }
}
